home *** CD-ROM | disk | FTP | other *** search
- Include multi.inc
- Include model.inc
-
- ;==============================================================================
- ;
- ; CAS function 07h -- Open A File
- ;
- ; Format:
- ; int CASOpenFile (int handle, int file, BYTE queue)
- ; Input:
- ; handle of event, receive file number, queue to search
- ; Output:
- ; Returns file handle or negative error code
- ;==============================================================================
-
- .CODE
- CASOpenFile PROC arg1:WORD, arg2:WORD, arg3:BYTE
-
- push bx ; save registers
- push cx
- push dx
-
- mov ax,MUX ; load multiplex number
- mov ah,al ; move into ah
- mov al,07h ; CAS function 7
- mov bx,arg1 ; event handle
- mov cx,arg2 ; receive file number
- mov dl,arg3 ; queue to search
- int 2Fh
-
- cmp ax,0 ; ax = 0?
- jne FINISH ; open file failed, return err. code
- mov ax,bx ; move file handle to ax
- FINISH:
- pop dx ; restore registers
- pop cx
- pop bx
- ret
- CASOpenFile endp
-
- END
-
-